package com.debao.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.debao.system.mapper.StadiumTableScheduleMapper;
import com.debao.system.domain.StadiumTableSchedule;
import com.debao.system.service.IStadiumTableScheduleService;

/**
 * 桌台排期Service业务层处理
 *
 * @author DeBao
 * @date 2024-06-13
 */
@Service
public class StadiumTableScheduleServiceImpl implements IStadiumTableScheduleService {
    @Autowired
    private StadiumTableScheduleMapper stadiumTableScheduleMapper;

    /**
     * 查询桌台排期
     *
     * @param id 桌台排期主键
     * @return 桌台排期
     */
    @Override
    public StadiumTableSchedule selectStadiumTableScheduleById(Long id) {
        return stadiumTableScheduleMapper.selectStadiumTableScheduleById(id);
    }

    /**
     * 查询桌台排期列表
     *
     * @param stadiumTableSchedule 桌台排期
     * @return 桌台排期
     */
    @Override
    public List<StadiumTableSchedule> selectStadiumTableScheduleList(StadiumTableSchedule stadiumTableSchedule) {
        return stadiumTableScheduleMapper.selectStadiumTableScheduleList(stadiumTableSchedule);
    }

    @Override
    public List<StadiumTableSchedule> selectStadiumTableScheduleGroupList(StadiumTableSchedule stadiumTableSchedule) {
        return stadiumTableScheduleMapper.selectStadiumTableScheduleGroupList(stadiumTableSchedule);
    }

    /**
     * 新增桌台排期
     *
     * @param stadiumTableSchedule 桌台排期
     * @return 结果
     */
    @Override
    public int insertStadiumTableSchedule(StadiumTableSchedule stadiumTableSchedule) {
        return stadiumTableScheduleMapper.insertStadiumTableSchedule(stadiumTableSchedule);
    }

    /**
     * 修改桌台排期
     *
     * @param stadiumTableSchedule 桌台排期
     * @return 结果
     */
    @Override
    public int updateStadiumTableSchedule(StadiumTableSchedule stadiumTableSchedule) {
        return stadiumTableScheduleMapper.updateStadiumTableSchedule(stadiumTableSchedule);
    }

    /**
     * 批量删除桌台排期
     *
     * @param ids 需要删除的桌台排期主键
     * @return 结果
     */
    @Override
    public int deleteStadiumTableScheduleByIds(Long[] ids) {
        return stadiumTableScheduleMapper.deleteStadiumTableScheduleByIds(ids);
    }

    /**
     * 删除桌台排期信息
     *
     * @param id 桌台排期主键
     * @return 结果
     */
    @Override
    public int deleteStadiumTableScheduleById(Long id) {
        return stadiumTableScheduleMapper.deleteStadiumTableScheduleById(id);
    }

    @Override
    public boolean isSocked(Long id) {
        return stadiumTableScheduleMapper.isSocked(id);
    }


    /**
     * 根据订单号更新状态
     * @param orderNo
     * @return
     */
    @Override
    public int updateStatus(String orderNo) {
        return stadiumTableScheduleMapper.updateStatus(orderNo);
    }
}
